33 - HPC Cafe 2022-05-10: From C++98 to C++11/14/17 [ID:42030]
50 von 618 angezeigt

Yes, today I will be talking about the modern C++.

I know it's not the newest of the C++ standard.

The newer one would be C++ 20 and next year C++ 23 will be hitting, but we are aware that

especially in HPC the compilers lacked the support or lacked the support previously and

so it's very understandable to switch to C++ 11, 14 or 17 now and not 10 years earlier.

Today first there will be a brief introduction and then I will just go through the at least

to me most important parts of the changes of C++ 11, 14 and 17.

The most important slide for you is probably this one.

What are my definitions?

Well everything before C++ 2003 I call old C++, you might as well also call it good old

C++, everything after C++ 11 and before C++ 20 I call modern C++ and the newest standard

so C++ 20 and beyond I call next C++ but I don't speak about them pretty much at all.

So they are not on the slides, I might mention them sometimes, but the focus of this talk

is primarily on C++ 11 to 17.

I've looked at the compiler support of the general compiler so GCC Clang and Microsoft

Visual Compiler and almost all of them support C++ 14 and 17 and in terms of C++ 20 only

Microsoft compiler supports everything and GCC is very close.

Now this is for the general compilers, in the case of a cluster there are these special

ones, you need to check if they support everything.

I would hope so because C++ 11, I mean that's 11 years ago but please check before you start

making changes to your code base.

My own problem was I am too young to remember the good old C++ so I really needed to go

through the books to find out what is the difference because I was taught C++ 11 from

the get go and so I would be very happy about any feedback regarding this talk if it helped

you or not.

I have roughly 45 minutes, I hope I will not talk longer than that and since there are

only 45 minutes I won't be able to talk about everything and I won't be talking to you about

everything in detail.

So this is just a subset of things I won't talk about which is also kind of important

but not the big features, not the big changes.

I have basically used two different approaches, the one was I looked at the books which introduced

the differences like an update, like a diff of the C++ standard which is my favorite effective

model C++ by Scott Miles and C++ 17 by Peter Poehmer and in general I am just looking at

the webpage Cppreference.

This is a great resource to look everything up, they have nice descriptions, they have

good examples so that's where I look for stuff.

Now I already told you 45 minutes is not enough to talk about everything.

There are lectures at DFAU about C++, at our chair there are advanced programming techniques

which basically goes through the whole standard and tries to teach you everything about C++.

There is also the smaller online class advanced C++ programming.

Outside of the university there are some YouTube channels I like very much.

The first one is C++ weekly with Jason Turner, every Monday there is some topic he talks

about.

Another YouTube channel is Copper Spice, they have a set of videos on modern C++, they are

very informative and not that long so you can go through it bit by bit.

And on the recent I think three or four Cppcons they have always the back to basics tracks

where experienced people have a talk about for example smart pointers, for example the

special member functions of a class.

So basic stuff you should, a C++, a modern C++ programmer should know at least in theory

but from time to time I rewatch them again because from time to time I tend to forget

Teil einer Videoserie :
Teil eines Kapitels:
HPC Café

Zugänglich über

Offener Zugang

Dauer

01:11:40 Min

Aufnahmedatum

2022-05-10

Hochgeladen am

2022-05-15 19:26:04

Sprache

en-US

Jan Hönig (Chair for System Simulation) gives an introduction to the new features that have entered the C++ language standard after C++98.

Slides: https://hpc.fau.de/files/2022/05/2022-05-10_hoenig_cplusplus.pdf

Einbetten
Wordpress FAU Plugin
iFrame
Teilen